package com.example.websocketdemo.service;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.example.websocketdemo.config.WebSocketTest;

import java.io.IOException;


public class RealTimeTankFarmDataService {

    //静态变量
    private static String T101_temperature;
    private static String T101_liquidLevel;
    private static String T102_temperature;
    private static String T102_liquidLevel;
    private static String T103_temperature;
    private static String T103_liquidLevel;
    private static String T104_temperature;
    private static String T104_liquidLevel;
    private static String T105_temperature;
    private static String T105_liquidLevel;
    private static String T106_temperature;
    private static String T106_liquidLevel;
    private static String T107_temperature;
    private static String T107_liquidLevel;
    private static String T108_temperature;
    private static String T108_liquidLevel;
    private static String T109_temperature;
    private static String T109_liquidLevel;
    private static String T110_temperature;
    private static String T110_liquidLevel;
    private static String T111_temperature;
    private static String T111_liquidLevel;
    private static String T112_temperature;
    private static String T112_liquidLevel;
    private static String T113_temperature;
    private static String T113_liquidLevel;
    private static String T114_temperature;
    private static String T114_liquidLevel;
    private static String T115_temperature;
    private static String T115_liquidLevel;


    //判断
    public void transferParameters(String bitNumber, Double AV) {
        if (bitNumber.contains("SCADA_A_LT1011")){
            T101_liquidLevel = String.format("%.2f", AV)+" m";
        }else if (bitNumber.contains("SCADA_A_TT1011")){
            T101_temperature = String.format("%.2f", AV)+" ℃";
        }else if (bitNumber.contains("SCADA_A_LT1021") ){
            T102_liquidLevel = String.format("%.2f", AV)+" m";
        }else if ( bitNumber.contains("SCADA_A_TT1021")){
            //T102
            T102_temperature = String.format("%.2f", AV)+" ℃";
        }else if (bitNumber.contains("SCADA_A_LT1031") ){
            T103_liquidLevel = String.format("%.2f", AV)+" m";
        }else if ( bitNumber.contains("SCADA_A_TT1031")){
            //T103
            T103_temperature = String.format("%.2f", AV)+" ℃";
        }else if (bitNumber.contains("SCADA_A_LT1041") ){
            T104_liquidLevel = String.format("%.2f", AV)+" m";
        }else if ( bitNumber.contains("SCADA_A_TT1041")){
            //T104
            T104_temperature = String.format("%.2f", AV)+" ℃";
        }else if (bitNumber.contains("SCADA_A_LT1051") ){
            T105_liquidLevel = String.format("%.2f", AV)+" m";
        }else if ( bitNumber.contains("SCADA_A_TT1051")){
            //T105
            T105_temperature = String.format("%.2f", AV)+" ℃";
        }else if (bitNumber.contains("SCADA_A_LT1061") ){
            T106_liquidLevel = String.format("%.2f", AV)+" m";
        }else if ( bitNumber.contains("SCADA_A_TT1061")){
            //T106
            T106_temperature = String.format("%.2f", AV)+" ℃";
        }else if (bitNumber.contains("SCADA_A_LT1071") ){
            T107_liquidLevel = String.format("%.2f", AV)+" m";
        }else if ( bitNumber.contains("SCADA_A_TT1071")){
            //T107
            T107_temperature = String.format("%.2f", AV)+" ℃";
        }else if (bitNumber.contains("SCADA_A_LT1081") ){
            T108_liquidLevel = String.format("%.2f", AV)+" m";
        }else if ( bitNumber.contains("SCADA_A_TT1081")){
            //T108
            T108_temperature = String.format("%.2f", AV)+" ℃";
        }else if (bitNumber.contains("SCADA_A_LT1091") ){
            T109_liquidLevel = String.format("%.2f", AV)+" m";
        }else if ( bitNumber.contains("SCADA_A_TT1091")){
            //T109
            T109_temperature = String.format("%.2f", AV)+" ℃";
        }else if (bitNumber.contains("SCADA_A_LT1101") ){
            T110_liquidLevel = String.format("%.2f", AV)+" m";
        }else if ( bitNumber.contains("SCADA_A_TT1101")){
            //T110
            T110_temperature = String.format("%.2f", AV)+" ℃";
        }else if (bitNumber.contains("SCADA_A_LT1111") ){
            T111_liquidLevel = String.format("%.2f", AV)+" m";
        }else if ( bitNumber.contains("SCADA_A_TT1111")){
            //T111
            T111_temperature = String.format("%.2f", AV)+" ℃";
        }else if (bitNumber.contains("SCADA_A_LT1121") ){
            T112_liquidLevel = String.format("%.2f", AV)+" m";
        }else if ( bitNumber.contains("SCADA_A_TT1121")){
            //T112
            T112_temperature = String.format("%.2f", AV)+" ℃";
        }else if (bitNumber.contains("SCADA_A_LT1131") ){
            T113_liquidLevel = String.format("%.2f", AV)+" m";
        }else if ( bitNumber.contains("SCADA_A_TT1131")){
            //T113
            T113_temperature = String.format("%.2f", AV)+" ℃";
        }else if (bitNumber.contains("SCADA_A_LT1141") ){
            T114_liquidLevel = String.format("%.2f", AV)+" m";
        }else if ( bitNumber.contains("SCADA_A_TT1141")){
            //T114
            T114_temperature = String.format("%.2f", AV)+" ℃";
        }else if (bitNumber.contains("SCADA_A_LT1151") ){
            T115_liquidLevel = String.format("%.2f", AV)+" m";
        }else if ( bitNumber.contains("SCADA_A_TT1151")){
            //T115
            T115_temperature = String.format("%.2f", AV)+" ℃";
        }
    }


    public void t(String message) throws IOException {
        JSONObject transition = JSON.parseObject(message);
        String value = "";
        if (message.contains("油气回收")) {
            value = (String) transition.get("油气回收");
        } else if (message.contains("调节罐")) {
            value = (String) transition.get("调节罐");
        } else if (message.contains("罐区区域名称")) {
            value = (String) transition.get("罐区区域名称");
        }
        JSONObject jsonObject = new JSONObject();
        JSONObject xinxi = new JSONObject();
        JSONObject xinxi1 = new JSONObject();
        JSONObject xinxi2 = new JSONObject();
        JSONObject xinxi3 = new JSONObject();
        JSONObject jsonObject1 = new JSONObject();
        JSONObject youqihuishou = new JSONObject();
        JSONObject youqihuishou1 = new JSONObject();
        JSONObject youqihuishou2 = new JSONObject();
        JSONObject youqihuishou3 = new JSONObject();
        JSONObject jsonObject2 = new JSONObject();
        JSONObject tiaojieguan = new JSONObject();
        JSONObject tiaojieguan1 = new JSONObject();
        JSONObject tiaojieguan2 = new JSONObject();
        JSONObject tiaojieguan3 = new JSONObject();


        JSONArray Array = new JSONArray();
        JSONArray Array1 = new JSONArray();
        JSONArray Array2 = new JSONArray();

        jsonObject.put("instruction", "guanqu");
        jsonObject1.put("instruction", "youqihuishou");
        jsonObject2.put("instruction", "tiaojieguan");
//        jsonObject3.put("instruction", "jishuichi");

        if (value.equals("T111")) {
            xinxi.put("id", "T111");
            xinxi.put("所属区域名称", "一号库汽油罐区");
            xinxi.put("设备名称", "T111汽油罐");
//            xinxi.put("指标名称", "LT1111油罐液位");
            xinxi.put("实时●数值", "1.88");
            xinxi.put("单位", "m");
            xinxi.put("低低报", "1.85");
            xinxi.put("低报", "2");
            xinxi.put("高报", "13.5");
            xinxi.put("高高报", "14.5");
            xinxi.put("量程下限", "0");
            xinxi.put("量程上限", "17");
            xinxi.put("位号", "SCADA_A_LT1111");
            xinxi.put("罐的形状类型", "内浮顶");
            xinxi.put("压力类型", "常压罐");
            xinxi.put("设计压力", "1 kPa");
            xinxi.put("最高工作压力", "1 kPa");
            xinxi.put("温度类型", "常温罐");
            xinxi.put("设计温度低限", "0 ℃");
            xinxi.put("设计温度高限", "100 ℃");
            xinxi.put("储存介质", "汽油");
            xinxi.put("压力", "");
            xinxi.put("温度", T111_liquidLevel);//产品温度
            xinxi.put("油罐液位", T111_temperature);//油罐液位

            xinxi.put("issue", "true");
            Array.add(xinxi);
            youqihuishou.put("所属区域名称", "一号库汽油罐区");
            youqihuishou.put("LT300SC吸收塔液位", "1.39%");
            youqihuishou.put("PIT450集气管真空度", "2.56inHg");
            youqihuishou.put("PIT451集气管真空度", "3.31inHg");
            youqihuishou.put("PIT400PSI集气管压力", "0.312OPSI");
            youqihuishou.put("TE100F集气管线温度", "1.06℃");
            youqihuishou.put("TE201供油泵温度", "3.36℃");
            youqihuishou.put("TE207F真空泵温度", "2.66℃");
            Array1.add(youqihuishou);
            tiaojieguan.put("所属区域名称", "一号库汽油罐区");
            tiaojieguan.put("罐液位", "2.64m");
            tiaojieguan.put("罐压力", "3.12MPa");
            Array2.add(tiaojieguan);
        } else if (value.equals("T112")) {
            xinxi3.put("id", "T112");
            xinxi3.put("所属区域名称", "一号库汽油罐区");
            xinxi3.put("设备名称", "T112汽油罐");
            xinxi3.put("实时●数值", "0.87");
            xinxi3.put("单位", "℃");
            xinxi3.put("低低报", "-");
            xinxi3.put("低报", "-");
            xinxi3.put("高报", "-");
            xinxi3.put("高高报", "-");
            xinxi3.put("量程下限", "0");
            xinxi3.put("量程上限", "100");
            xinxi3.put("罐的形状类型", "SCADA_A_TT1111");
            xinxi3.put("罐的形状类型", "内浮顶");
            xinxi3.put("压力类型", "常压罐");
            xinxi3.put("设计压力", "1 kPa");
            xinxi3.put("最高工作压力", "1 kPa");
            xinxi3.put("温度类型", "常温罐");
            xinxi3.put("设计温度低限", "0 ℃");
            xinxi3.put("设计温度高限", "100 ℃");
            xinxi3.put("储存介质", "汽油");
            xinxi3.put("温度", T112_temperature);//产品温度
            xinxi3.put("油罐液位", T112_liquidLevel);//油罐液位
            xinxi3.put("issue", "false");
            Array.add(xinxi3);
            youqihuishou1.put("所属区域名称", "一号库汽油罐区");
            youqihuishou1.put("LT300SC吸收塔液位", "1.19%");
            youqihuishou1.put("PIT450集气管真空度", "2.26inHg");
            youqihuishou1.put("PIT451集气管真空度", "3.41inHg");
            youqihuishou1.put("PIT400PSI集气管压力", "0.212 OPSI");
            youqihuishou1.put("TE100F集气管线温度", "1.26℃");
            youqihuishou1.put("TE201供油泵温度", "2.36℃");
            youqihuishou1.put("TE207F真空泵温度", "3.66℃");
            Array1.add(youqihuishou1);
            tiaojieguan1.put("所属区域名称", "一号库汽油罐区");
            tiaojieguan1.put("罐液位", "2.94m");
            tiaojieguan1.put("罐压力", "2.12MPa");
            Array2.add(tiaojieguan1);
        } else if (value.equals("T113")) {
            xinxi.put("id", "T113");
            xinxi1.put("所属区域名称", "一号库汽柴油罐区");
            xinxi1.put("设备名称", "T113汽油罐");
            xinxi1.put("实时●数值", "4.91");
            xinxi1.put("单位", "");
            xinxi1.put("低低报", "-");
            xinxi1.put("低报", "-");
            xinxi1.put("高报", "-");
            xinxi1.put("高高报", "-");
            xinxi1.put("量程下限", "-");
            xinxi1.put("量程上限", "-");
            xinxi1.put("位号", "SCADA_D_LS1012");
            xinxi1.put("罐的形状类型", "内浮顶");
            xinxi1.put("压力类型", "常压罐");
            xinxi1.put("设计压力", "1 kPa");
            xinxi1.put("最高工作压力", "1 kPa");
            xinxi1.put("温度类型", "常温罐");
            xinxi1.put("设计温度低限", "0 ℃");
            xinxi1.put("设计温度高限", "100 ℃");
            xinxi1.put("温度", T113_temperature);//产品温度
            xinxi1.put("油罐液位", T113_liquidLevel);//油罐液位
            xinxi1.put("储存介质", "汽油");
            xinxi1.put("issue", "false");
            Array.add(xinxi1);
            youqihuishou2.put("所属区域名称", "一号库汽柴油罐区");
            youqihuishou2.put("LT300SC吸收塔液位", "1.45%");
            youqihuishou2.put("PIT450集气管真空度", "2.67inHg");
            youqihuishou2.put("PIT451集气管真空度", "3.92inHg");
            youqihuishou2.put("PIT400PSI集气管压力", "0.263 OPSI");
            youqihuishou2.put("TE100F集气管线温度", "1.76℃");
            youqihuishou2.put("TE201供油泵温度", "2.19℃");
            youqihuishou2.put("TE207F真空泵温度", "3.32℃");
            Array1.add(youqihuishou2);
            tiaojieguan2.put("所属区域名称", "一号库汽柴油罐区");
            tiaojieguan2.put("罐液位", "2.13m");
            tiaojieguan2.put("罐压力", "2.39MPa");
            Array2.add(tiaojieguan2);
        } else if (value.equals("T114")) {
            xinxi.put("id", "T114");
            xinxi2.put("所属区域名称", "一号库汽柴油罐区");
            xinxi2.put("设备名称", "T114汽油罐");
            xinxi2.put("实时●数值", "0.10");
            xinxi2.put("单位", "");
            xinxi2.put("低低报", "-");
            xinxi2.put("低报", "-");
            xinxi2.put("高报", "-");
            xinxi2.put("高高报", "-");
            xinxi2.put("量程下限", "-");
            xinxi2.put("量程上限", "-");
            xinxi2.put("位号", "SIS_D_XZSO_T106B");
            xinxi2.put("罐的形状类型", "内浮顶");
            xinxi2.put("压力类型", "常压罐");
            xinxi2.put("设计压力", "1 kPa");
            xinxi2.put("最高工作压力", "1 kPa");
            xinxi2.put("温度类型", "常温罐");
            xinxi2.put("设计温度低限", "0 ℃");
            xinxi2.put("设计温度高限", "100 ℃");
            xinxi2.put("储存介质", "汽油");
            xinxi2.put("温度", T114_temperature);//产品温度
            xinxi2.put("油罐液位", T114_liquidLevel);//油罐液位
            xinxi.put("issue", "false");
            Array.add(xinxi2);
            youqihuishou3.put("所属区域名称", "一号库汽柴油罐区");
            youqihuishou3.put("LT300SC吸收塔液位", "1.90%");
            youqihuishou3.put("PIT450集气管真空度", "2.76inHg");
            youqihuishou3.put("PIT451集气管真空度", "3.11inHg");
            youqihuishou3.put("PIT400PSI集气管压力", "0.142 OPSI");
            youqihuishou3.put("TE100F集气管线温度", "1.37℃");
            youqihuishou3.put("TE201供油泵温度", "2.96℃");
            youqihuishou3.put("TE207F真空泵温度", "2.46℃");
            Array1.add(youqihuishou3);
            tiaojieguan3.put("所属区域名称", "一号库汽柴油罐区");
            tiaojieguan3.put("罐液位", "2.94m");
            tiaojieguan3.put("罐压力", "2.12MPa");
            Array2.add(tiaojieguan3);
        } else if (value.equals("T115")) {
            xinxi.put("id", "T115");
            xinxi.put("所属区域名称", "一号库汽油罐区");
            xinxi.put("设备名称", "T115汽油罐");
            xinxi.put("实时●数值", "0.67");
            xinxi.put("单位", "m");
            xinxi.put("低低报", "-");
            xinxi.put("低报", "-");
            xinxi.put("高报", "-");
            xinxi.put("高高报", "-");
            xinxi.put("量程下限", "0");
            xinxi.put("量程上限", "17");
            xinxi.put("位号", "SIS_A_LT_1113");
            xinxi.put("罐的形状类型", "内浮顶");
            xinxi.put("压力类型", "常压罐");
            xinxi.put("设计压力", "1 kPa");
            xinxi.put("最高工作压力", "1 kPa");
            xinxi.put("温度类型", "常温罐");
            xinxi.put("设计温度低限", "0 ℃");
            xinxi.put("设计温度高限", "100 ℃");
            xinxi.put("储存介质", "汽油");
            xinxi.put("温度", T115_temperature);//产品温度
            xinxi.put("油罐液位", T115_liquidLevel);//油罐液位
            xinxi.put("issue", "false");
            Array.add(xinxi);
        } else if (value.equals("T101")) {
            xinxi.put("id", "T101");
            xinxi.put("所属区域名称", "一号库汽柴油罐区");
            xinxi.put("设备名称", "T101汽油罐");
            xinxi.put("实时●数值", "2.02");
            xinxi.put("单位", "");
            xinxi.put("低低报", "-");
            xinxi.put("低报", "-");
            xinxi.put("高报", "-");
            xinxi.put("高高报", "-");
            xinxi.put("量程下限", "-");
            xinxi.put("量程上限", "-");
            xinxi.put("位号", "SIS_C_XSOV_T103B");
            xinxi.put("罐的形状类型", "内浮顶");
            xinxi.put("压力类型", "常压罐");
            xinxi.put("设计压力", "1 kPa");
            xinxi.put("最高工作压力", "1 kPa");
            xinxi.put("温度类型", "常温罐");
            xinxi.put("设计温度低限", "0 ℃");
            xinxi.put("设计温度高限", "100 ℃");
            xinxi.put("储存介质", "汽油");
            xinxi.put("温度", T101_temperature);//产品温度
            xinxi.put("油罐液位", T101_liquidLevel);//油罐液位
            xinxi.put("issue", "false");
            Array.add(xinxi);
        } else if (value.equals("T102")) {
            xinxi.put("id", "T102");
            xinxi.put("所属区域名称", "一号库汽柴油罐区");
            xinxi.put("设备名称", "T102汽油罐");
            xinxi.put("实时●数值", "1.45");
            xinxi.put("单位", "℃");
            xinxi.put("低低报", "-");
            xinxi.put("低报", "-");
            xinxi.put("高报", "38");
            xinxi.put("高高报", "48");
            xinxi.put("量程下限", "0");
            xinxi.put("量程上限", "100");
            xinxi.put("位号", "SCADA_A_TT1112");
            xinxi.put("罐的形状类型", "内浮顶");
            xinxi.put("压力类型", "常压罐");
            xinxi.put("设计压力", "1 kPa");
            xinxi.put("最高工作压力", "1 kPa");
            xinxi.put("温度类型", "常温罐");
            xinxi.put("设计温度低限", "0 ℃");
            xinxi.put("设计温度高限", "100 ℃");
            xinxi.put("储存介质", "汽油");
            xinxi.put("温度", T102_temperature);//产品温度
            xinxi.put("油罐液位", T102_liquidLevel);//油罐液位
            xinxi.put("issue", "false");
            Array.add(xinxi);
        } else if (value.equals("T103")) {
            xinxi.put("id", "T103");
            xinxi.put("所属区域名称", "一号库汽柴油罐区");
            xinxi.put("设备名称", "T103汽油罐");
            xinxi.put("实时●数值", "1.72");
            xinxi.put("单位", "");
            xinxi.put("低低报", "-");
            xinxi.put("低报", "-");
            xinxi.put("高报", "-");
            xinxi.put("高高报", "-");
            xinxi.put("量程下限", "-");
            xinxi.put("量程上限", "-");
            xinxi.put("位号", "SIS_C_XSOV_T102B");
            xinxi.put("罐的形状类型", "内浮顶");
            xinxi.put("压力类型", "常压罐");
            xinxi.put("设计压力", "1 kPa");
            xinxi.put("最高工作压力", "1 kPa");
            xinxi.put("温度类型", "常温罐");
            xinxi.put("设计温度低限", "0 ℃");
            xinxi.put("设计温度高限", "100 ℃");
            xinxi.put("储存介质", "汽油");
            xinxi.put("温度", T103_temperature);//产品温度
            xinxi.put("油罐液位", T103_liquidLevel);//油罐液位
            xinxi.put("issue", "false");
            Array.add(xinxi);
        } else if (value.equals("T104")) {
            xinxi.put("id", "T104");
            xinxi.put("所属区域名称", "一号库汽柴油罐区");
            xinxi.put("设备名称", "T104汽油罐");
            xinxi.put("实时●数值", "4.38");
            xinxi.put("单位", "");
            xinxi.put("低低报", "-");
            xinxi.put("低报", "-");
            xinxi.put("高报", "-");
            xinxi.put("高高报", "-");
            xinxi.put("量程下限", "-");
            xinxi.put("量程上限", "-");
            xinxi.put("位号", "SCADA_D_HY1111");
            xinxi.put("罐的形状类型", "内浮顶");
            xinxi.put("压力类型", "常压罐");
            xinxi.put("设计压力", "1 kPa");
            xinxi.put("最高工作压力", "1 kPa");
            xinxi.put("温度类型", "常温罐");
            xinxi.put("设计温度低限", "0 ℃");
            xinxi.put("设计温度高限", "100 ℃");
            xinxi.put("储存介质", "汽油");
            xinxi.put("温度", T104_temperature);//产品温度
            xinxi.put("油罐液位", T104_liquidLevel);//油罐液位
            xinxi.put("issue", "false");
            Array.add(xinxi);
        } else if (value.equals("T105")) {
            xinxi.put("id", "T105");
            xinxi.put("所属区域名称", "一号库汽柴油罐区");
            xinxi.put("设备名称", "T105汽油罐");
            xinxi.put("实时●数值", "2.89");
            xinxi.put("单位", "");
            xinxi.put("低低报", "-");
            xinxi.put("低报", "-");
            xinxi.put("高报", "-");
            xinxi.put("高高报", "-");
            xinxi.put("量程下限", "-");
            xinxi.put("量程上限", "-");
            xinxi.put("位号", "SCADA_D_HY2022");
            xinxi.put("罐的形状类型", "内浮顶");
            xinxi.put("压力类型", "常压罐");
            xinxi.put("设计压力", "1 kPa");
            xinxi.put("最高工作压力", "1 kPa");
            xinxi.put("温度类型", "常温罐");
            xinxi.put("设计温度低限", "0 ℃");
            xinxi.put("设计温度高限", "100 ℃");
            xinxi.put("储存介质", "汽油");
            xinxi.put("温度", T105_temperature);//产品温度
            xinxi.put("油罐液位", T105_liquidLevel);//油罐液位
            xinxi.put("issue", "false");
            Array.add(xinxi);
        } else if (value.equals("T106")) {
            xinxi.put("id", "T106");
            xinxi.put("所属区域名称", "一号库汽柴油罐区");
            xinxi.put("设备名称", "T106汽油罐");
            xinxi.put("实时●数值", "1.08");
            xinxi.put("单位", "");
            xinxi.put("低低报", "-");
            xinxi.put("低报", "-");
            xinxi.put("高报", "-");
            xinxi.put("高高报", "-");
            xinxi.put("量程下限", "-");
            xinxi.put("量程上限", "-");
            xinxi.put("位号", "SCADA_D_HY1113");
            xinxi.put("罐的形状类型", "内浮顶");
            xinxi.put("压力类型", "常压罐");
            xinxi.put("设计压力", "1 kPa");
            xinxi.put("最高工作压力", "1 kPa");
            xinxi.put("温度类型", "常温罐");
            xinxi.put("设计温度低限", "0 ℃");
            xinxi.put("设计温度高限", "100 ℃");
            xinxi.put("储存介质", "汽油");
            xinxi.put("温度", T106_temperature);//产品温度
            xinxi.put("油罐液位", T106_liquidLevel);//油罐液位
            xinxi.put("issue", "false");
            Array.add(xinxi);
        } else if (value.equals("T107")) {
            xinxi.put("id", "T107");
            xinxi.put("所属区域名称", "一号库汽柴油罐区");
            xinxi.put("设备名称", "T107柴油罐");
            xinxi.put("实时●数值", "4.07");
            xinxi.put("单位", "");
            xinxi.put("低低报", "-");
            xinxi.put("低报", "-");
            xinxi.put("高报", "-");
            xinxi.put("高高报", "-");
            xinxi.put("量程下限", "-");
            xinxi.put("量程上限", "-");
            xinxi.put("位号", "SCADA_D_LS1112");
            xinxi.put("罐的形状类型", "内浮顶");
            xinxi.put("压力类型", "常压罐");
            xinxi.put("设计压力", "1 kPa");
            xinxi.put("最高工作压力", "1 kPa");
            xinxi.put("温度类型", "常温罐");
            xinxi.put("设计温度低限", "0 ℃");
            xinxi.put("设计温度高限", "100 ℃");
            xinxi.put("储存介质", "汽油");
            xinxi.put("温度", T107_temperature);//产品温度
            xinxi.put("油罐液位", T107_liquidLevel);//油罐液位
            xinxi.put("issue", "false");
            Array.add(xinxi);
        } else if (value.equals("T108")) {
            xinxi.put("id", "T108");
            xinxi.put("所属区域名称", "一号库汽柴油罐区");
            xinxi.put("设备名称", "T108柴油罐");
            xinxi.put("实时●数值", "4.25");
            xinxi.put("单位", "");
            xinxi.put("低低报", "-");
            xinxi.put("低报", "-");
            xinxi.put("高报", "-");
            xinxi.put("高高报", "-");
            xinxi.put("量程下限", "-");
            xinxi.put("量程上限", "-");
            xinxi.put("位号", "SIS_D_XZSC_T106B");
            xinxi.put("罐的形状类型", "内浮顶");
            xinxi.put("压力类型", "常压罐");
            xinxi.put("设计压力", "1 kPa");
            xinxi.put("最高工作压力", "1 kPa");
            xinxi.put("温度类型", "常温罐");
            xinxi.put("设计温度低限", "0 ℃");
            xinxi.put("设计温度高限", "100 ℃");
            xinxi.put("储存介质", "汽油");
            xinxi.put("温度", T108_temperature);//产品温度
            xinxi.put("油罐液位", T108_liquidLevel);//油罐液位
            xinxi.put("issue", "false");
            Array.add(xinxi);
        } else if (value.equals("T109")) {
            xinxi.put("id", "T109");
            xinxi.put("所属区域名称", "一号库汽柴油罐区");
            xinxi.put("设备名称", "T109柴油罐");
            xinxi.put("实时●数值", "3.67");
            xinxi.put("单位", "");
            xinxi.put("低低报", "-");
            xinxi.put("低报", "-");
            xinxi.put("高报", "-");
            xinxi.put("高高报", "-");
            xinxi.put("量程下限", "-");
            xinxi.put("量程上限", "-");
            xinxi.put("位号", "SIS_D_XZSO_T106A");
            xinxi.put("罐的形状类型", "内浮顶");
            xinxi.put("压力类型", "常压罐");
            xinxi.put("设计压力", "1 kPa");
            xinxi.put("最高工作压力", "1 kPa");
            xinxi.put("温度类型", "常温罐");
            xinxi.put("设计温度低限", "0 ℃");
            xinxi.put("设计温度高限", "100 ℃");
            xinxi.put("储存介质", "汽油");
            xinxi.put("issue", "false");
            xinxi.put("温度", T109_temperature);//产品温度
            xinxi.put("油罐液位", T109_liquidLevel);//油罐液位
            Array.add(xinxi);
        } else if (value.equals("T110")) {
            xinxi.put("id", "T110");
            xinxi.put("所属区域名称", "一号库汽柴油罐区");
            xinxi.put("设备名称", "T110柴油罐");
            xinxi.put("实时●数值", "2.15");
            xinxi.put("单位", "");
            xinxi.put("低低报", "-");
            xinxi.put("低报", "-");
            xinxi.put("高报", "-");
            xinxi.put("高高报", "-");
            xinxi.put("量程下限", "-");
            xinxi.put("量程上限", "-");
            xinxi.put("位号", "SIS_D_XZSC_T106A");
            xinxi.put("罐的形状类型", "内浮顶");
            xinxi.put("压力类型", "常压罐");
            xinxi.put("设计压力", "1 kPa");
            xinxi.put("最高工作压力", "1 kPa");
            xinxi.put("温度类型", "常温罐");
            xinxi.put("设计温度低限", "0 ℃");
            xinxi.put("设计温度高限", "100 ℃");
            xinxi.put("储存介质", "汽油");
            xinxi.put("issue", "false");
            xinxi.put("温度", T110_temperature);//产品温度
            xinxi.put("油罐液位", T110_liquidLevel);//油罐液位
            Array.add(xinxi);
        }

        if (message.contains("油气回收")) {
            jsonObject1.put("array", Array1);
            WebSocketTest.sendInfo(jsonObject1.toJSONString(), "connect");
        } else if (message.contains("调节罐")) {
            jsonObject2.put("array", Array2);
            WebSocketTest.sendInfo(jsonObject2.toJSONString(), "connect");
        } else if (message.contains("罐区区域名称")) {
            jsonObject.put("array", Array);
            WebSocketTest.sendInfo(jsonObject.toJSONString(), "connect");
        }

    }
}
